{% extends "home/base.html" %}

{% block content %}
    <div class="container" style="margin-top:76px">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title"><span class="glyphicon glyphicon-log-in"></span>&nbsp;会员登录</h3>
                    </div>
                    <div class="panel-body">
                        {% for msg in get_flashed_messages(category_filter=['success']) %}
                            <p class="login-box-msg" style="color:green">{{ msg }}</p>
                        {% endfor %}
                        {% for msg in get_flashed_messages(category_filter=['error']) %}
                            <p class="login-box-msg" style="color:red">{{ msg }}</p>
                        {% endfor %}
                        <form role="form" method="post">
                            <fieldset>
                                <div class="form-group">
                                    <label for="input_contact"><span
                                            class="glyphicon glyphicon-user"></span>&nbsp;{{ form.name.label }}</label>
                                    {{ form.name }}
                                    {% for error in form.name.errors %}
                                        <div class="col-md-12" id="input_user">
                                            <font style="color: red;">{{ error }}</font>
                                        </div>
                                    {% endfor %}
                                </div>
                                <div class="col-md-12" id="error_contact"></div>
                                <div class="form-group">
                                    <label for="input_password"><span
                                            class="glyphicon glyphicon-lock"></span>&nbsp;{{ form.pwd.label }}</label>
                                    {{ form.pwd }}
                                    {% for error in form.pwd.errors %}
                                        <div class="col-md-12" id="input_user">
                                            <font style="color: red;">{{ error }}</font>
                                        </div>
                                    {% endfor %}
                                </div>
                                <div class="col-md-12" id="error_password"></div>
                                {{ form.csrf_token }}
                                {{ form.submit }}
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}